<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>

    <meta charset="utf-8">
    <title>登录页</title>
    <!-- Custom fonts for this template-->
    <link th:href="@{/vendor/fontawesome-free/css/all.css}" rel="stylesheet" >
    <!-- Custom styles for this template-->
    <link th:href="@{/css/sb-admin.css}" rel="stylesheet">
    <!-- Bootstrap core JavaScript-->
    <script th:src="@{/vendor/jquery/jquery.min.js}"></script>
    <script th:src="@{/vendor/bootstrap/js/bootstrap.bundle.min.js}"></script>

    <!-- Core plugin JavaScript-->
    <script th:src="@{/vendor/jquery-easing/jquery.easing.min.js}"></script>

</head>

<body  style="background-image:url('imag/imag.png');background-size: 100% 100%">

<div class="container" >
    <div class="card card-login mx-auto mt-5">
        <div class="card-header">日程云共享管理系统
            <div style="float:right">
                <a class="btn btn-primary btn-sm" th:href="@{/toRegister}" >注册</a></div>
        </div>
        <div class="card-body">
            <form method="post"  th:action="@{/loginAction}" >
                <div class="form-group">
                    <div class="form-label-group">
                        <input type="text" id="username" class="form-control" placeholder="用户名" required autofocus="autofocus" name="username">
                        <label for="username">用户名</label>
                    </div>
                </div>
                <div class="form-group">
                    <div class="form-label-group">
                        <input type="password" id="password" class="form-control" placeholder="密码" required name="password">
                        <label for="password">密码</label>
                    </div>
                </div>
                <div class="text-center">
                    <button type="submit" class="btn btn-primary btn-block">登录</button>
                </div>
            </form>
            <div class="text-center">
                <a class="d-block small" th:href="@{/reset-password}">忘记密码?</a>
            </div>
        </div>
        <div th:if="${msg!=null}" class="alert alert-danger" role="alert">
                <a th:text="${msg.get('message')}" style="color:red"> </a>
        </div>
        <div th:if="${success!=null}" class="alert alert-danger" role="alert">
            <a th:text="${success.get('message')}" style="color:red"> </a>
        </div>
    </div>
</div>



</body>

</html>
